﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameManager : MonoBehaviour
{
    [Header("启动方式")]
    [SerializeField] bool csvLoad;
    [SerializeField] bool storyPlay;
    [SerializeField] bool loadStory;
    [SerializeField] bool saveStory;

    [Header("调用到的组件")]
    [SerializeField] StoryDataManager storyDataManager;
    [SerializeField] StoryManager storyManager;

    // Start is called before the first frame update
    void Start()
    {
        StoryDataManager sdm = StoryDataManager.Instance;

        if (loadStory)
            sdm.LoadData();

        if (csvLoad)
            sdm.LoadStoryCSV("StoryTest");

        if (storyPlay)
        {
            
            storyManager.StoryPlaying(2);

            //StoryDataManager.Instance.stories = new List<Story>();
            //StoryDataManager.Instance.characters = new List<StoryCharacterData>();
            //StoryDataManager.Instance.CreatStory();
            //StoryDataManager.Instance.CreatStory();
        }

        if(saveStory)
            sdm.SaveData();
    }
}
